package com.yh.homestay.common;

import com.yh.homestay.pojo.SysPermission;
import com.yh.homestay.pojo.UserStaff;

/**
 * @ClassName SysPermissionResult
 * @Description TODO
 * @Author GCL
 * @Date 2020/1/10 10:41
 */
public class SysPermissionResult {
    private Integer code;
    private String msg;
    private SysPermission sysPermission;


    public SysPermissionResult(Integer code) {
        this.code = code;
    }

    public SysPermissionResult(Integer code, SysPermission sysPermission) {
        this.code = code;
        this.sysPermission = sysPermission;
    }

    public SysPermissionResult(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static SysPermissionResult ok() {
        return new SysPermissionResult(200);
    }

    public static SysPermissionResult ok(Integer code, SysPermission sysPermission) {
        return new SysPermissionResult(code, sysPermission);
    }

    public static SysPermissionResult build(Integer code, String msg) {
        return new SysPermissionResult(code, msg);
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public SysPermission getSysPermission() {
        return sysPermission;
    }

    public void setSysPermission(SysPermission sysPermission) {
        this.sysPermission = sysPermission;
    }
}
